<?php
class VB_Navigation_Items extends VB_Db_Table {
	protected $_name = 'vb_navigationitem';
	protected $_primary = 'navigationitem_id';

	protected $_rowClass = 'VB_Navigation_Item';
	
	/**
	 * Get the direct children of the given navigationitem_id
	 *
	 * @param int $navigationitem_id
	 * @return unknown
	 */
	public function getChildren($navigationitem_id) {
		$query = $this->select()->where('navigationitem_parent_id = ?', $navigationitem_id);
		return $this->fetchAll($query);
	}
	
	
}
new VB_Navigation_Item();